package com.ailk.kbi.kbiwarden.wsi.service;

import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;

import com.ailk.kbi.kbiwarden.wsi.type.request.ConditionsType;
import com.ailk.kbi.kbiwarden.wsi.type.request.AuthInfoType;
import com.ailk.kbi.kbiwarden.wsi.type.response.ResultType;

/**
 * 查询服务接口
 * 
 * @author kyunra
 * 
 */
@WebService
interface Query {
	/**
	 * 同步方式得到数据
	 * 
	 * @param login
	 * @param table
	 * @param dim
	 * @return
	 */
	@WebResult(name="result")
	ResultType getData(@WebParam(name = "login") AuthInfoType login,
			@WebParam(name = "table") String table,
			@WebParam(name = "conditions") ConditionsType conditions);

	/**
	 * 异步方式得到数据
	 * 
	 * @param login
	 * @param table
	 * @param dim
	 * @param notifyAddress
	 * @return
	 */
	@WebResult(name="result")
	ResultType getDataAsyn(@WebParam(name = "login") AuthInfoType login,
			@WebParam(name = "table") String table,
			@WebParam(name = "conditions") ConditionsType conditions);

	/**
	 * 订阅方式得到数据
	 * 
	 * @param login
	 * @param table
	 * @param dim
	 * @param notifyAddress
	 * @return
	 */
	@WebResult(name="result")
	ResultType getDataSubscribe(@WebParam(name = "login") AuthInfoType login,
			@WebParam(name = "table") String table,
			@WebParam(name = "conditions") ConditionsType conditions,
			@WebParam(name = "notifyAddress") String notifyAddress);

	/**
	 * 异步/订阅方式得到数据的结果
	 * 
	 * @param login
	 * @param sessionId
	 * @return
	 */
	@WebResult(name="result")
	ResultType getDataResult(@WebParam(name = "login") AuthInfoType login,
			@WebParam(name = "sessionId") String sessionId);
}
